package com.luoying.itew.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.luoying.itew.R;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by Administrator on 2018/5/29.
 * time 2018-5-10
 * author zm
 */
public class ChartsTypeItemView extends RelativeLayout {
    @BindView(R.id.view_chart_type_color)
    View viewChartTypeColor;
    @BindView(R.id.tv_chart_type)
    TextView tvChartType;

    public ChartsTypeItemView(Context context) {
        this(context, null);
    }

    public ChartsTypeItemView(Context context, AttributeSet attrs) {
        super(context, attrs);
        init();
    }

    private void init() {
        View.inflate(getContext(), R.layout.chartstype_itemview, this);
        ButterKnife.bind(this, this);
    }

    public void setText(String s, Integer integer) {
        tvChartType.setText(s);
        viewChartTypeColor.setBackgroundColor(integer);
    }
}
